package com.ssy.lingxi.marketing.service.feign;

import com.ssy.lingxi.common.response.PageData;
import com.ssy.lingxi.common.response.Wrapper;
import com.ssy.lingxi.product.api.model.request.feign.CommodityPriceRequest;
import com.ssy.lingxi.product.api.model.response.BrandResponse;
import com.ssy.lingxi.product.api.model.response.commodity.CommodityGoodsResponse;
import com.ssy.lingxi.product.api.model.response.commodity.CommodityOrderResponse;
import com.ssy.lingxi.product.api.model.response.commodity.CustomerCategoryResponse;
import com.ssy.lingxi.product.api.model.response.feign.CommodityPriceResponse;
import com.ssy.lingxi.search.api.model.request.TemplateCommoditySearchRequest;
import com.ssy.lingxi.search.api.model.response.CommoditySearchResponse;

import java.util.List;
import java.util.Map;

/**
 * 商品内部接口
 * @author yzc
 * @version 2.0.0
 * @date 2021/7/19
 */
public interface IProductFeignService {

    /**
     * 查询品类信息
     * @param idList 品类id
     * @return 查询结果
     */
    Wrapper<List<CustomerCategoryResponse>> getCustomerCategoryById(List<Long> idList);

    /**
     * 查询品牌信息
     * @param idList 品牌id
     * @return 查询结果
     */
    Wrapper<List<BrandResponse>> getBrandById(List<Long> idList);

    /**
     * 查询商品信息列表--订单校验商品信息
     * @param commodityPriceRequest 接口参数
     * @return 查询结果
     */
    List<CommodityOrderResponse> getCommodityListByOrder(CommodityPriceRequest commodityPriceRequest);

    /**
     * 查询商品信息
     * @param templateCommoditySearchRequest 接口参数
     * @return 查询结果
     */
    Wrapper<PageData<CommoditySearchResponse>> searchCommodityList(TemplateCommoditySearchRequest templateCommoditySearchRequest);

    /**
     * 批量查询商品价格
     * @param shopId 商城id
     * @param commodityType 商品类型: 1-会员商品; 2-渠道商品
     * @param memberId
     * @param roleId
     * @param skuIds
     * @return
     */
    Map<Long, Map<String, Double>> getCommodityPriceBatch(Long shopId,Integer commodityType,Long memberId,Long roleId,List<Long> skuIds);

    /**
     * 批量查询商品价格与是否允许会员折购买
     * @param shopId
     * @param commodityType
     * @param memberId
     * @param roleId
     * @param skuIds
     * @return
     */
    Map<Long, CommodityPriceResponse> getCommodityPriceAndMemberPriceBatch(Long shopId, Integer commodityType, Long memberId, Long roleId,List<Long> skuIds);

    /**
     * 批量查询sku商品信息
     * @param skuIds
     * @param memberId 商品归属会员id
     * @param roleId 商品归属角色id
     * @param status 审核状态: 1-待提交审核, 2-待审核, 3-审核不通过, 4-审核通过, 5-上架, 6-下架
     * @return
     */
    Map<Long, CommodityGoodsResponse> getCommoditySkuMap(List<Long> skuIds, Long memberId, Long roleId, Integer status);
}
